package 每日练习;
//计算水仙花数
public class text20 {
    public static void main(String[] args) {
        int i = 0;
        int x,y,z;
        int count = 0;
        for(i = 100;i<1000;i++)
        {
            x = i % 10;
            y = i/10%10;
            z = i/100%10;
            if(Math.pow(x,3)+Math.pow(y,3)+Math.pow(z,3) == i) {
                System.out.print(i + " ");
                count++;
            }
        }
        System.out.println("水仙花个数有"+count+"个");
    }
}
